package com.design.adapter.player;

public class AdapterDemo {
    public static void main(String[] args) {
        // 创建 ExternalAudioPlayer 对象
        ExternalAudioPlayer externalAudioPlayer = new ExternalAudioPlayer();
        
        // 使用适配器将 ExternalAudioPlayer 适配成我们的 MediaPlayer 接口
        MediaPlayer audioPlayerAdapter = new AudioPlayerAdapter(externalAudioPlayer);

        // 播放音频文件
        audioPlayerAdapter.play("song.mp3");
    }
}
